package observer.advanced;

/**
 * @author Chen Guang
 * @date 2019/4/10 0010 上午 11:14
 */
public class Test {
    public static void main(String[] args) throws Exception{
        Subject boss = new BossSubject();
        NBAObserver nbaObserver = new NBAObserver(boss, "魏关斋");
        StockObserver stockObserver = new StockObserver(boss, "易管查");

        boss.attach(nbaObserver, "closeNBADirectSeeding", (Object[]) null);
        boss.attach(stockObserver, "closeStockMarket", (Object[]) null);

        boss.setSubjectState("不是针对谁，我胡汉三说在座的各位都是辣鸡 ");
        boss.notifyObserver();
    }
}
